<?php /* Smarty version 2.6.18, created on 2012-02-21 14:06:27
         compiled from user/search.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'html_options', 'user/search.tpl', 12, false),)), $this); ?>
<?php if (isset ( $this->_tpl_vars['type'] )): ?>
    <div class="secSearch">
    	<table cellpadding="0" cellspacing="0" border="0" width="100%">
       		<tbody>
    			<?php if ($this->_tpl_vars['type'] == 1): ?>            
                    <tr>
                        <td class="firstChild" width="20%">
                            <label for="poption">Tìm theo:</label>
                            <select name="poption" id="poption">
                                <option value="0">Tất cả</option>
                                <?php if (isset ( $_SESSION['post'] )): ?>
                                	<?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['arrOption'],'selected' => $_SESSION['post']['poption']), $this);?>

                                <?php else: ?>
                                	<?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['arrOption']), $this);?>

                                <?php endif; ?>
                            </select>
                        </td>
                        <td width="20%" class="text">
                            <label for="pkey">Từ khóa:</label>
                            <input type="text" name="pkey" id="pkey" value=""/>
                        </td>
                        <td width="20%">
                            <label for="pgender">Giới tính:</label>
                            <select name="pgender" id="pgender">
                                <option value="0">Tất cả</option>
                                <?php if (isset ( $_SESSION['post'] )): ?>
                                	<?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['arrGender'],'selected' => $_SESSION['post']['pgender']), $this);?>

                                <?php else: ?>
                                	<?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['arrGender']), $this);?>

                                <?php endif; ?>
                            </select>
                        </td>
                        <td width="20%">
                            <label for="pcountry">Quốc gia:</label>
                            <select name="pcountry" id="pcountry">
                            	<?php if (isset ( $_SESSION['post'] )): ?>
                                	<?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['arrCountry'],'selected' => $_SESSION['post']['pcountry']), $this);?>

                                <?php else: ?>
                                	<?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['arrCountry'],'selected' => @COUNTRY_DEFAULT), $this);?>

                                <?php endif; ?>
                            </select>
                        </td>
                        <td width="20%" class="lastChild">
                            <label for="pprovince">Tỉnh/thành:</label>
                            <select name="pprovince" id="pprovince">
                                <option value="0">Tất cả</option>
                                <?php if (isset ( $_SESSION['post'] )): ?>
                                	<?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['arrProvince'],'selected' => $_SESSION['post']['pprovince']), $this);?>

                                <?php else: ?>
                                	<?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['arrProvince']), $this);?>

                                <?php endif; ?>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td class="firstChild">
                            <label for="pafrom">Độ tuổi:</label>
                            <select name="pafrom" id="pafrom" class="half firstItem">
                                <option value="0">Tất cả</option>
                                <?php if (isset ( $_SESSION['post'] )): ?>
                                	<?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['arrAge'],'selected' => $_SESSION['post']['pafrom']), $this);?>

                                <?php else: ?>
                                	<?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['arrAge']), $this);?>

                                <?php endif; ?>
                            </select>
                            <select name="pato" id="pato" class="half">
                                <option value="0">Tất cả</option>
                                <?php if (isset ( $_SESSION['post'] )): ?>
                                	<?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['arrAge'],'selected' => $_SESSION['post']['pato']), $this);?>

                                <?php else: ?>
                                	<?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['arrAge']), $this);?>

                                <?php endif; ?>
                            </select>
                        </td>
                        <td width="20%">
                            <label for="preligion">Tôn giáo:</label>
                            <select name="preligion" id="preligion">
                                <option value="0">Tất cả</option>
                                <?php if (isset ( $_SESSION['post'] )): ?>
                                	<?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['arrReligion'],'selected' => $_SESSION['post']['preligion']), $this);?>

                                <?php else: ?>
                                	<?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['arrReligion']), $this);?>

                                <?php endif; ?>
                            </select>
                        </td>
                        <td width="20%">
                            <label for="peducation">Trình độ học vấn:</label>
                            <select name="peducation" id="peducation">
                                <option value="0">Tất cả</option>
                                <?php if (isset ( $_SESSION['post'] )): ?>
                                	<?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['arrEducation'],'selected' => $_SESSION['post']['peducation']), $this);?>

                                <?php else: ?>
                                	<?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['arrEducation']), $this);?>

                                <?php endif; ?>
                            </select>
                        </td>
                        <td width="20%">
                            <label for="poccupation">Nghề nghiệp:</label>
                            <select name="poccupation" id="poccupation">
                                <option value="0">Tất cả</option>
                                <?php if (isset ( $_SESSION['post'] )): ?>
                                	<?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['arrOccupation'],'selected' => $_SESSION['post']['poccupation']), $this);?>

                                <?php else: ?>
                                	<?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['arrOccupation']), $this);?>

                                <?php endif; ?>
                            </select>
                        </td>
                        <td width="20%" class="lastChild">
                            <label for="pposition">Chức vụ:</label>
                            <select name="pposition" id="pposition">
                                <option value="0">Tất cả</option>
                                <?php if (isset ( $_SESSION['post'] )): ?>
                                	<?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['arrPosition'],'selected' => $_SESSION['post']['pposition']), $this);?>

                                <?php else: ?>
                                	<?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['arrPosition']), $this);?>

                                <?php endif; ?>
                            </select>
                        </td>
                    </tr>    
                <?php elseif ($this->_tpl_vars['type'] == 2): ?>
                    <tr>        
                        <td width="20%" class="firstChild" >
                            <label for="pkey">Email:</label>
                            <input type="text" name="pkey" id="pkey" />
                        </td>                
                        <td width="20%">
                            <label for="pgender">Giới tính:</label>
                            <select name="pgender" id="pgender">
                                <option value="0">Tất cả</option>
                                <?php if (isset ( $_SESSION['post'] )): ?>
                                    <?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['arrGender'],'selected' => $_SESSION['post']['pgender']), $this);?>

                                <?php else: ?>
                                    <?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['arrGender']), $this);?>

                                <?php endif; ?>
                            </select>
                        </td>
                        <td width="20%">
                            <label for="pcountry">Quốc gia:</label>
                            <select name="pcountry" id="pcountry">                              
                                <?php if (isset ( $_SESSION['post'] )): ?>
                                    <?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['arrCountry'],'selected' => $_SESSION['post']['pcountry']), $this);?>

                                <?php else: ?>
                                    <?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['arrCountry'],'selected' => @COUNTRY_DEFAULT), $this);?>

                                <?php endif; ?>
                            </select>
                        </td>
                        <td width="20%" class="lastChild">
                            <label for="pprovince">Tỉnh/thành:</label>
                            <select name="pprovince" id="pprovince">
                                <option value="0">Tất cả</option>
                                <?php if (isset ( $_SESSION['post'] )): ?>
                                    <?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['arrProvince'],'selected' => $_SESSION['post']['pprovince']), $this);?>

                                <?php else: ?>
                                    <?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['arrProvince']), $this);?>

                                <?php endif; ?>
                            </select>
                        </td>
                        <td class="lastChild">
                            <label for="pafrom">Độ tuổi:</label>
                            <select name="pafrom" id="pafrom" class="half firstItem">
                                <option value="0">Tất cả</option>
                                <?php if (isset ( $_SESSION['post'] )): ?>
                                    <?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['arrAge'],'selected' => $_SESSION['post']['pafrom']), $this);?>

                                <?php else: ?>
                                    <?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['arrAge']), $this);?>

                                <?php endif; ?>
                            </select>
                            <select name="pato" id="pato" class="half">
                                <option value="0">Tất cả</option>
                                <?php if (isset ( $_SESSION['post'] )): ?>
                                    <?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['arrAge'],'selected' => $_SESSION['post']['pato']), $this);?>

                                <?php else: ?>
                                    <?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['arrAge']), $this);?>

                                <?php endif; ?>
                            </select>
                        </td>                        
                    </tr> 
                    <tr>
                        <td width="20%" class="firstChild">
                            <label for="pregfrom">Ngày đăng ký:</label>
                            <input type="text" name="pregfrom" id="pregfrom" class="half firstItem"/>
                            <input type="text" name="pregfrom" id="pregto" class="half"/>
                        </td>
                        <td colspan="4">&nbsp;</td>
                    </tr>   
                    
                <?php endif; ?>
                <tr>
                     <td align="center" colspan="5">
                        <input type="submit" value="Tìm kiếm" class="btn" />
                        <?php if (isset ( $_SESSION['pcancel'] ) && $_SESSION['pcancel'] == 'Y'): ?>                
                            <input type="button" value="Thôi tìm kiếm" class="btnCancel"/>
                        <?php endif; ?>
                    </td>
                </tr>
            </tbody>
    	</table>
    </div>
<?php endif; ?>